<?php

// [ 获取PK10初始信息 ]
// GET pk10.init
// http://sg.51hub.cn/api?pk10.init
// http://sg.io/api?pk10.init

namespace app\api\resource\pk10;
use think\Db;

class Init
{
    // 方法
    public $_method = ['GET'];
    // 前置
    public $_pre    = [];
    // 描述
    public $_description = '获取PK10初始信息';
    // 参数
    public $_param  = [];

    public function run(&$request)
    {
        $res = Db::name('pk10')->order('no DESC')->find();
        $arr = [
            'res'     => $res,
            'bj_time' => time(),
            'rule'    => [
                'win' => 12,
                'item'=> [
                    'c3' => 8,
                    'c4' => 6,
                    'c5' => 4,
                    'c6' => 2,
                ],
            ],
        ];

        return [200,$arr];
    }
}
